<div class="span-5" id="content-left">
    <?php $this->load->view('layouts/left'); ?>
</div>
<div class="span-19 last" id="content">
    <div class="block-main-head">
        <a href="<?php echo site_url();?>/video"><?php echo $node['category_title']; ?></a>
    </div>
    <div class="block-main-sub"></div>
    <div class="span-19">
        <div class="content-center">
            <div class="news-box" id="home-photo">
                <center>
                    <h2 class="title"><?php echo $node['title'];?></h2>
                    <div>
                        <?php
                            if(!empty($node['link']))
                            {
                                //Replace link youtube
                                $videoUrl = str_replace('http://www.youtube.com/watch?v=', 'http://www.youtube-nocookie.com/v/', $node['link']);
                                
                                $embed = '<object width="725" height="400">';
                                $embed.= '<param name="movie" value="'.$videoUrl.'?fs=1&amp;hl=en_US&amp;rel=0"></param>';
                                $embed.= '<param name="allowFullScreen" value="true"></param>';
                                $embed.= '<param name="allowscriptaccess" value="always"></param>';
                                $embed.= '<embed src="'.$videoUrl.'fs=1&amp;hl=en_US&amp;rel=0" type="application/x-shockwave-flash" width="725" height="400" allowscriptaccess="always" allowfullscreen="true"></embed></object>';
                        ?>
                        <object width="725" height="400">
                            <param name="movie" value="<?php echo $videoUrl; ?>?fs=1&amp;hl=en_US&amp;rel=0"></param>
                            <param name="allowFullScreen" value="true"></param>
                            <param name="allowscriptaccess" value="always"></param>
                            <embed src="<?php echo $videoUrl; ?>?fs=1&amp;hl=en_US&amp;rel=0" type="application/x-shockwave-flash" width="725" height="400" allowscriptaccess="always" allowfullscreen="true"></embed>
                        </object>
                        <?php 
                            }
                            else
                            {
                                $embed = $node['value'];
                                echo $node['value'];
                            }
                        ?>
                    </div>
                </center>
                <div style="margin: 10px 0; overflow: hidden">
                    <div style="float: left">
                        <span class="download">
                            <a href="<?php echo $node['link']; ?>" target="_blank">Download</a></span>
                        </div>
                    <div style="float: right;" class="share">
                        <?php $this->load->view('block/share'); ?>
                    </div>
                </div>
                <table style="background: #e6e6e6;padding: 10px 0">
                    <tr>
                        <td style="text-align: right;">Embed:</td>
                        <td><input type="text" name="embed" size="100" value='<?php echo $embed; ?>' style="color: #666;" onclick="this.select()" /></td>
                    </tr>
                    <tr>
                        <td style="text-align: right;">Link:</td>
                        <td><input type="text" name="embed" size="100" value="<?php echo current_url();?>" style="color: #666;" onclick="this.select()"/></td>
                    </tr>
                </table>
            </div>
            <?php $this->load->view('comment/comment_block'); ?>
        </div>
    </div>
    <br class="clear" />
    <div style="border-top: 1px solid #CCC; width: 700px; margin: 20px auto; text-align: center; font-weight: bold; padding: 5px;">
    <img src="<?php echo base_url(); ?>static/images/icon/li.png" /><img src="<?php echo base_url(); ?>static/images/icon/li.png" />
    Bạn muốn tìm hiểu thêm về Tin Lành hoặc muốn tiếp nhận Chúa vào đời sống mình nhưng không biết phải bắt đầu từ đâu? Hãy liên hệ ngay với oneway.vn bằng cách <a href="<?php echo site_url();?>/contact/tiepnhan">click vào đây</a>, chúng tôi sẽ hỗ trợ bạn!
    </div>
    &nbsp;
    <h3 class="blue" style="text-transform: uppercase"><?php echo $node['category_title']; ?> khác:</h3>
    <div class="span-19" style="background: #7d7d7d; margin: 2px 0 5px 0;">
        <div style="background: #000; overflow: hidden; position: relative">
            <a id="video_gallery_prev" href="#"><div class="span-1 prev"></div></a>
                <ul class="film-gallery hide" id="video_gallery">
                    
                </ul>
            <a id="video_gallery_next" href="#"><div class="span-1 next"></div></a>
        </div>
        <p class="arrow-right"><a href="<?php echo site_url(); ?>/video">xem toàn bộ danh sách</a></p>
    </div>
    &nbsp;
</div>
<script type="text/javascript" src="<?php echo base_url(); ?>static/js/jquery.carouFredSel-2.2.2.js"></script>
<script type="text/javascript">
$(document).ready(function(){
    getRandVideo(<?php echo $node['category_id']; ?>,10,'video_gallery');
});
</script>